Quick start guide to begin using the Weather API
This tutorial walks you through making your first call to the Weather API.
Important: This setup procedure requires that you have an existing Open Weather Account.
You can sign up at OpenWeatherMap Sign Up.
Go to My API Keys and generate an API key.
Note: You can generate as many API keys as needed for your subscription.
Save your key in an environment variable:
Make a Weather API request to return a JSON response for the current conditions information for San Francisco, CA. You must include your API key's alphanumeric string with every request and use HTTPS for requests that include the API key.
Click API_KEY in the code below to insert the key's alphanumeric string:
Click the copy icon in the code sample to copy the curl command.
Paste the command in a terminal window and run the command.
Try the 5-day Forecast
See the Authentication page for details on using your key securely.